package com.orangelife.webservice.service.commquery;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.orangelife.common.MybaitsGenericDaoSubLogic;
import com.orangelife.exception.AppBizException;

@Service("BaseDao")
public class BaseDaoService extends MybaitsGenericDaoSubLogic implements IBaseDaoService  {

	@Override
	public SqlSession getSqlSession1	() {
		// TODO Auto-generated method stub
		return this.getSqlSession();
	}
/**
 * 根据XMLID进行查询
 * */

	@Override
	public List<Map<String, Object>> selectDataListByXmlID(String xmlID,Map<String,Object> params,
			int iPageNo, int iPageSize) throws AppBizException {
		PageHelper.startPage(iPageNo, iPageSize);

		List<Map<String, Object>> list = this.getSqlSession()
				.selectList(xmlID,params);
		
		
		
//		Map<String ,Map<String,String>>m=this.getSqlSession().selectMap(xmlID, params,"id");
		
		return list;
	}
@Override
public Map<String, Object> selectDataByXmlID(String xmlID,
		Map<String, Object> params) throws AppBizException {
	
	
	 Map<String, Object> m=this.getSqlSession().selectOne(xmlID, params);
	return m;
}
@Override
public SqlSession getSqlSession1(String id) throws AppBizException {
	
	
	return this.getSqlSession(id);
}


}
